from tenacity import retry, stop_after_attempt, wait_fixed, retry_if_exception_type
from requests.exceptions import RequestException

# example decorator to retry on RequestException up to 3 times
retry_request = retry(
    retry=retry_if_exception_type(RequestException),
    stop=stop_after_attempt(2),
    wait=wait_fixed(2)
)
